package HomeWork;

import java.util.ArrayList;

public class Test2 {
    public static void main(String[] args) {
        ArrayList<Teacher> list=new ArrayList<>();
         list.add(new Teacher("赵老师","javase"));
         list.add(new Teacher("钱老师","javaee"));
         list.add(new Teacher("孙老师","php"));
         list.add(new Teacher("李老师","python"));
        /*for (int i = 0; i < list.size(); i++) {
            System.out.println("姓名："+list.get(i).getName()+",  专业"+list.get(i).getMajor());
        }*/
        Teacher teacher=new Teacher("yy老师","python");
        list.toString();
        System.out.println(list.toString());
        System.out.println(list);
        System.out.println(teacher);
    }
}
